package cn.kk.pzhu.gpaweb.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author KK
 * @CreateTime 2022-08-29
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Gpa implements Serializable {


    @TableId(type = IdType.AUTO)
    private int id;

    /**
     * 学号
     */
    private String stuId;

    /**
     * 姓名
     */
    private String name;

    /**
     * 绩点
     */
    private double credit;

    /**
     * 学年
     */
    private String time;

    private String classes;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date create_time;

    public Gpa(String stuId, String name, double parseDouble, String s, String classes, Date create_time) {
        this.stuId = stuId;
        this.name = name;
        this.credit = parseDouble;
        this.time = s;
        this.classes = classes;
        this.create_time = create_time;
    }
}
